﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CourseSystem.Core.Entities.TeacherInfo>" %>
<% using (Ajax.BeginForm("UserEditUc", new { Model.Id }, new AjaxOptions { HttpMethod = "Post", UpdateTargetId = "editDiv", }))
   {%>
<% Html.RenderPartial("HighLightMsgUc"); %>
<fieldset>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Type) %>
    </div>
    <div class="editor-field">
        <select id="Type" name="Type">
            <option value="0">管理员</option>
            <option value="1">负责教师</option>
            <option value="2">主讲教师</option>
            <option value="3">助教</option>
        </select>
        <%: Html.ValidationMessageFor(model => model.Type)%>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Account) %>
    </div>
    <div class="editor-field">
        <%: Html.TextBoxFor(model => model.Account) %>
        <%: Html.ValidationMessageFor(model => model.Account) %>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Name) %>
    </div>
    <div class="editor-field">
        <%: Html.TextBoxFor(model => model.Name) %>
        <%: Html.ValidationMessageFor(model => model.Name) %>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Pass) %>
    </div>
    <div class="editor-field">
        <%: Html.PasswordFor(model => model.Pass) %>
        <%: Html.ValidationMessageFor(model => model.Pass) %>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Introduction) %>
    </div>
    <div class="editor-field">
        <%: Html.PasswordFor(model => model.Introduction)%>
        <%: Html.ValidationMessageFor(model => model.Introduction)%>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Img) %>
    </div>
    <div class="editor-field">
        <img src="<%=ResolveUrl("~/"+Model.Img) %>" width="250px" />
         <input type="file" name="UpFile" />
        <%: Html.ValidationMessageFor(model => model.Introduction)%>
    </div>
    <p>
        <input type="submit" value="保存" />
    </p>
</fieldset>
<% } %>
